var _ssa = _ssa || {};
function isPrd(){
	var origin = location.origin;
	if(/djsit.cnsuning.com/.test(origin) || /dev.cnsuning.com/.test(origin)){
	   return false;
	}else if(/djpre.cnsuning.com/.test(origin)){
		return false;
	}else{
		return true;
	}
}

(function () {
	_ssa.websiteId = isPrd()?'c16e4b2c330d4447ac9418d72962fcbf':'7a994d7470474ab5b9b4ff2d9b27b572';
	console.log(_ssa.websiteId)
	_ssa.base_url = 'http://wsa.cloudytrace.cn';
	_ssa.api = 'ctwsa-sa.gif';
  
	var _ssa_protocol = 'https:' == document.location.protocol ? 'https' : 'http';
	var _ssa_script = _ssa_protocol + '://' + 'script.cloudytrace.cn/wsa/common' + '/'+ 'ctwsa-sa.js';
	var _scripts = document.getElementsByTagName('script');
	for (var i = 0; i < _scripts.length; i++) {
		if (_scripts[i].src == _ssa_script) {
			return;
		}
	}
	var _script = document.createElement('script');
	_script.type = 'text/javascript';
	_script.async = true;
	_script.src = _ssa_script;
	var _s = _scripts[0];
	_s.parentNode.insertBefore(_script, _s);
    
})();